Users of document management or electronic messaging services may receive many different documents or messages related to many different topics every day. To arrange their documents or messages and to be able to easily locate interesting or important documents or messages, users oftentimes apply labels to their documents or messages or place the documents or messages into folders. For example, in an electronic messaging service, a user may assign messages from members of his/her family the label “family,” and messages concerning taxes, mortgages, or retirement the label “finance.” One drawback of this labeling scheme is that users spend a lot of time reviewing their messages and determining that a particular message needs to be associated with a particular label or folder. Occasionally, users may forget to assign a label to a message, making locating and retrieving the message at a later time more difficult. As the foregoing illustrates, a technique for automatically classifying documents or messages by label or folder may be desirable.